﻿@{
    Layout = null;
    Context.Response.ContentType = "text/xml";
    
}
<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs 
        scrolling="true" 
        title="Clarizen" 
        height="195" 
        author="daniel" 
        author_email="Daniel.Lehmann@lehavi.com" 
        description="Clarizen integration" screenshot="http://pub2-24.env.cloudshare.com/Images/ClarizenGadget.png" thumbnail="http://pub2-24.env.cloudshare.com/Images/favicon.ico">
    <Require feature="opensocial-0.8" />
    <Require feature="locked-domain"/>
    <Require feature="views" />
    <Require feature="dynamic-height"/>
    <Optional feature="maximize"/>
    <OAuth>
      <Service name="google">
        <Access url="https://www.google.com/accounts/OAuthGetAccessToken" method="GET" />
        <Request url="https://www.google.com/accounts/OAuthGetRequestToken?scope=http://www.google.com/m8/feeds/" method="GET" />
        <Authorization url="https://www.google.com/accounts/OAuthAuthorizeToken?oauth_callback=http://oauth.gmodules.com/gadgets/oauthcallback" />
      </Service>

      <Service name="clarizen">
        <Access url="https://app.clarizen.com/Clarizen/Pages/Account/OAuthGetAccessToken.ashx" method="GET" param_location="uri-query"/>
        <Request url="https://app.clarizen.com/Clarizen/Pages/Account/OAuthGetRequestToken.ashx?oauth_callback=http://oauth.gmodules.com/gadgets/oauthcallback" method="GET" param_location="uri-query"/>
        <Authorization url="https://app.clarizen.com/Clarizen/Pages/Account/OAuthAuthorizeToken.ashx" />
      </Service>


    </OAuth>

  </ModulePrefs>
  


  <Content type="html" view="home,profile">
    <![CDATA[
    <link rel="stylesheet" type="text/css" href="@(Logic.Constants.CurrentUrl)/Content/easyui/icon.css" />
    <link rel="stylesheet" type="text/css" href="@(Logic.Constants.CurrentUrl)/Content/easyui/easyui.css" />
    <script type="text/javascript" src="@(Logic.Constants.CurrentUrl)/Scripts/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="@(Logic.Constants.CurrentUrl)/Scripts/jquery-ui.js"></script>
    <script type="text/javascript" src="@(Logic.Constants.CurrentUrl)/Scripts/Site/jquery.myeasyui.min.js"></script>
    <script type="text/javascript" src="@(Logic.Constants.CurrentUrl)/Scripts/Site/globalScripts.js"></script>
    <script>
        function openFullScreen(url)
        {
            var supported_views = gadgets.views.getSupportedViews();
            gadgets.views.requestNavigateTo(supported_views['canvas'], { url: url });
        };

        $(document).ready(function ()
        {
            $('#createMenu').splitbutton({
                preclick: function (item, func)
                {
                    openFullScreen($(item).attr('url'));
                },
                menu: '#mm',
                withIcon: true
            });
        });
    </script>
        <style>
            body    {padding:10px; font-size:12px}
            body a  {text-decoration:none}
        </style>
        
        <a href="javascript:openFullScreen('tasks/index')" >Tasks <strong>››</strong></a><br/>
        <a href="javascript:openFullScreen('timesheet/edit')" >Time <strong>››</strong></a><br/>

        <a id='createMenu' iconCls="icon-draft" m-text='Create'>
            <div id="mm" style="width:125px;">  
                <div id='tasks' url='tasks/create' iconCls="icon-task" >Task</div>  
                <div id='Request' url='Request/create' iconCls="icon-request">Request</div>  
                <div id='Bug' url='Bug/create' iconCls="icon-bug">Bug</div>  
                <div id='Risk' url='Risk/create' iconCls="icon-risk">Risk</div>  
                <div id='Issues' url='Issues/create' iconCls="icon-issue">Issue</div>  
            </div>
        </a> 
  ]]>
  </Content>

  <Content type="html" view="default,canvas">
    <![CDATA[
        <script>
            var remoteUrl = "@(Logic.Constants.CurrentUrl)/canvas/";
            var isWide = true;
        </script>
        @{Html.RenderPartial("_TasksIndexContent");}
  ]]>
  </Content>
</Module>


